package com.example.yimai.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.example.yimai.dto.PageResponseDTO;
import com.example.yimai.dto.UserLoginResponseDTO;
import com.example.yimai.entity.User;

import java.util.List;
import java.util.Map;

public interface UserService extends IService<User> {

    public PageResponseDTO<User> queryUser(String keyword, int pageNum, int pageSize);
    public String addUser(Map<String,Object> params);
    public String deleteUser(Integer id);
    public String updateUser(Map<String,Object> params);

    public UserLoginResponseDTO login(String loginName, String password);

    public String logout(String token);

    public User register(Map<String, Object> registerParams);

    boolean verifyCaptcha(String key, String captcha);
    
    // 验证原密码是否正确
    boolean checkPassword(Integer userId, String oldPassword);
}
